package com.sohh.demo.demo0522;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collector;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

/**
 * @description:
 * @author: ruoan
 * @date: 2021/5/16 15:57
 */
public class Test13 {

    public static void main(String[] args) {

        //访问静态方法
        IConvert<String,String> iConvert = Something::startsWith;
        final String converted = iConvert.convert("123");
        System.out.println(converted);
        //访问对象方法
        Something something = new Something();
        IConvert<String,String> iConvert1 = something::endWith;
        final String java = iConvert1.convert("Java");
        System.out.println(java);
        //访问构造方法
        IConvert<String,Something> iConvert2 = Something::new;
        IConvert2<Something> iConvert21 = Something::new;
        final Something something1 = iConvert2.convert("contruct");
        System.out.println(something1);

    }



}
